package de.javakicker;

import java.lang.reflect.InvocationTargetException;

/**
 * Repraesentiert eine Team-Aufstellung.
 * @author Till Krullmann
 */
public interface Lineup
{
	/**
	 * Repraesentiert einen Spieler in einer Aufstellung.
	 */
	public interface Player
	{
		
		/**
		 * Gets the name.
		 *
		 * @return the name
		 */
		String getName();
		
		/**
		 * Gets the id.
		 *
		 * @return the id
		 */
		String getId();
		
		/**
		 * Gets the no.
		 *
		 * @return the no
		 */
		String getNo();

		/**
		 * Sets the name.
		 *
		 * @param name the new name
		 */
		void setName(String name);

		/**
		 * Gets the class name.
		 *
		 * @return the class name
		 */
		String getClassName();

		/**
		 * Hier kann ein Player zusaetzliche Attribute bekommen, z.B. um ihn hinterher
		 * in einer bestimmten Farbe darzustellen
		 *
		 * @return the comment
		 */
		String getComment();

		/**
		 * New instance.
		 *
		 * @return the javakicker.de. player
		 * @throws ClassNotFoundException the class not found exception
		 * @throws InvalidPlayerException the invalid player exception
		 * @throws InvocationTargetException the invocation target exception
		 */
		de.javakicker.Player newInstance()
			throws ClassNotFoundException, InvalidPlayerException,
			InvocationTargetException;
	}

	/**
	 * Gets the players.
	 *
	 * @return the players
	 */
	Player[] getPlayers();

	/**
	 * Gets the player.
	 *
	 * @param name the name
	 * @return the player
	 */
	Player getPlayer(String name);
	
	/**
	 * Adds the player.
	 *
	 * @param name the name
	 * @return the player
	 */
	Player addPlayer(String name);
	
	/**
	 * Removes the player.
	 *
	 * @param player the player
	 */
	void removePlayer(Player player);
	
	/**
	 * Gets the jersey color.
	 * @return color
	 */
	String getJersey();
}